#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>

int main() {
	for (int i = 0; i < 10; i++) {
		for (int j = 0; j < 10; j++) {
			for (int m = 0; m < 10; m++) {
				printf("%d %d %d", i, j, m);
				printf("\n");
				if (m == 5) {
					goto again;
				}
			}
		}
	}
	again:
	return 0;
}